
                    <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover" style="font-size:12px;">
                                <thead>
                                <tr>
                                    <td class="text-center">订单编号</td>
                                    <td class="text-center">手机号码</td>
                                    <td class="text-center"> 总金额 </td>
                                    <td class="text-center">订单状态</td>
                                    <td class="text-center">
                                        <a href="javascript:sort('add_time');">下单时间</a>
                                    </td>
                                    <td class="text-center">配送餐品</td>
                                    <td class="text-center">用户备注</td>
                                    <td class="text-center">配送状态</td>
                                    <!--<td class="text-center">操作</td>-->
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="orderList" id="list">
                                    <tr>
                                        <td class="text-center">{$list.order_sn}</td>
                                        <td class="text-center">{$list.phone}</td>
                                        <td class="text-center">{$list.goods_price}</td>
                                        <td class="text-center" id="order_status">
                                            <if condition="$list.order_status eq -1">已取消</if>
                                            <if condition="$list.order_status eq 0">未支付</if>
                                            <if condition="$list.order_status eq 1">待配餐</if>
                                            <if condition="$list.order_status eq 2">已完成</if>
                                        </td>
                                        <td class="text-center">{$list.add_time|date='Y-m-d H:i',###}</td>
                                        <td class="text-center">
                                            <volist name="$list.order_goods" id="order_goods">
                                                <p>{$order_goods.goods_name}&ensp;数量：{$order_goods.goods_num}&ensp;{$order_goods.spec_key_name}</p>
                                            </volist>
                                        </td>
                                        <td class="text-center">{$list.user_note}</td>
                                        <td class="text-center">
                                            <if condition="$list.order_status gt 0"><img width="20" height="20" src="__PUBLIC__/images/<if condition='$list.order_status eq 2'>yes.png<else />cancel.png</if>" onclick="changeTableVal2('meal_order','order_id','{$list.order_id}','order_status',this)"/></if>
                                        </td>

                                        <script>
                                            function changeTableVal2(table,id_name,id_value,field,obj)
                                            {
                                                var src = "";
                                                if($(obj).attr('src').indexOf("cancel.png") > 0 )
                                                {
                                                    src = '/public/images/yes.png';
                                                    var value = 2;
                                                    $("#order_status").html('已完成');

                                                }else{
                                                    src = '/public/images/cancel.png';
                                                    var value = 1;
                                                    $("#order_status").html('待配餐');
                                                }
                                                $.ajax({
                                                    url:"/index.php?m=mingteng&c=Index&a=changeTableVal&table="+table+"&id_name="+id_name+"&id_value="+id_value+"&field="+field+'&value='+value,
                                                    success: function(data){
                                                        $(obj).attr('src',src);
                                                    }
                                                });
                                            }
                                        </script>

                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                    </form>
                    <div class="row">
                        <div class="col-sm-6 text-left"></div>
                        <div class="col-sm-6 text-right">{$page}</div>
                    </div>
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
</script>